#tag Class
Class NSApplication
Inherits NSResponder
	#tag Method, Flags = &h0
		Sub Activate(ignoreOtherApps as Boolean)
		  
		  #if TargetMacOS
		    declare sub activateIgnoringOtherApps lib CocoaLib selector "activateIgnoringOtherApps:" (obj_id as Ptr, flag as Boolean)
		    
		    activateIgnoringOtherApps self, ignoreOtherApps
		    
		  #else
		    #pragma unused ignoreOtherApps
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub ActivateContextHelpMode()
		  
		  #if TargetMacOS
		    declare sub activateContextHelpMode lib CocoaLib selector "activateContextHelpMode:" (obj_id as Ptr, sender as Ptr)
		    
		    activateContextHelpMode self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub AddWindowsItem(aWindow as NSWindow, title as String, isFilename as Boolean)
		  
		  dim windowRef as Ptr
		  if aWindow <> nil then
		    windowRef = aWindow
		  end if
		  
		  self.AddWindowsItem windowRef, title, isFilename
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub AddWindowsItem(aWindowRef as Ptr, title as String, isFilename as Boolean)
		  
		  #if TargetMacOS
		    declare sub addWindowsItem lib CocoaLib selector "addWindowsItem:title:filename:" _
		    (obj_id as Ptr, aWindow as Ptr, title as CFStringRef, isFilename as Boolean)
		    
		    addWindowsItem self, aWindowRef, title, isFilename
		    
		  #else
		    #pragma unused aWindowRef
		    #pragma unused title
		    #pragma unused isFilename
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function App() As NSApplication
		  
		  #if TargetMacOS
		    declare function sharedApplication_ lib CocoaLib selector "sharedApplication" (class_id as Ptr) as Ptr
		    
		    static c as new NSApplication(sharedApplication_(Cocoa.NSClassFromString("NSApplication")))
		    
		    return c
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub ArrangeInFront()
		  
		  #if TargetMacOS
		    declare sub arrangeInFront lib CocoaLib selector "arrangeInFront:" (obj_id as Ptr, sender as Ptr)
		    
		    arrangeInFront self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub CancelUserAttentionRequest(request as Integer)
		  
		  #if TargetMacOS
		    declare sub cancelUserAttentionRequest lib CocoaLib selector "cancelUserAttentionRequest:" (obj_id as Ptr, request as Integer)
		    
		    cancelUserAttentionRequest(self, request)
		    
		  #else
		    #pragma unused request
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub ChangeWindowsItem(aWindow as NSWindow, title as String, isFilename as Boolean)
		  
		  dim windowRef as Ptr
		  if aWindow <> nil then
		    windowRef = aWindow
		  end if
		  
		  self.ChangeWindowsItem windowRef, title, isFilename
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub ChangeWindowsItem(aWindowRef as Ptr, title as String, isFilename as Boolean)
		  
		  #if TargetMacOS
		    declare sub changeWindowsItem lib CocoaLib selector "changeWindowsItem:title:filename:" _
		    (obj_id as Ptr, aWindow as Ptr, title as CFStringRef, isFilename as Boolean)
		    
		    changeWindowsItem self, aWindowRef, title, isFilename
		    
		  #else
		    #pragma unused aWindowRef
		    #pragma unused title
		    #pragma unused isFilename
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Function Context() As NSGraphicsContext
		  
		  #if TargetMacOS
		    declare function context lib CocoaLib selector "context" (obj_id as Ptr) as Ptr
		    
		    dim contextRef as Ptr = context(self)
		    if contextRef <> nil then
		      return new NSGraphicsContext(contextRef)
		    end if
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function CurrentSystemPresentationOptions() As UInt32
		  
		  #if TargetMacOS
		    declare function currentSystemPresentationOptions lib CocoaLib selector "currentSystemPresentationOptions" (obj_id as Ptr) as UInt32
		    
		    return currentSystemPresentationOptions(self)
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub Deactivate()
		  
		  #if TargetMacOS
		    declare sub deactivate lib CocoaLib selector "deactivate" (obj_id as Ptr)
		    
		    deactivate self
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub DisableRelaunchOnLogin()
		  
		  #if TargetMacOS
		    declare sub disableRelaunchOnLogin lib CocoaLib selector "disableRelaunchOnLogin" (obj_id as Ptr)
		    
		    disableRelaunchOnLogin self
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Function DockTile() As NSDockTile
		  
		  #if TargetMacOS
		    declare function dockTile lib CocoaLib selector "dockTile" (obj_id as Ptr) as Ptr
		    
		    dim dockTileRef as Ptr = dockTile(self)
		    if dockTileRef <> nil then
		      return new NSDockTile(dockTileRef)
		    end if
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub EnableRelaunchOnLogin()
		  
		  #if TargetMacOS
		    declare sub enableRelaunchOnLogin lib CocoaLib selector "enableRelaunchOnLogin" (obj_id as Ptr)
		    
		    enableRelaunchOnLogin self
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub Hide()
		  
		  #if TargetMacOS
		    declare sub hide lib CocoaLib selector "hide:" (obj_id as Ptr, sender as Ptr)
		    
		    hide self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub HideOtherApplications()
		  
		  #if TargetMacOS
		    declare sub hideOtherApplications lib CocoaLib selector "hideOtherApplications:" (obj_id as Ptr, sender as Ptr)
		    
		    hideOtherApplications self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Function IsActive() As Boolean
		  
		  #if TargetMacOS
		    declare function isActive lib CocoaLib selector "isActive" (obj_id as Ptr) as Boolean
		    
		    return isActive(self)
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function IsFullKeyboardAccessEnabled() As Boolean
		  
		  #if TargetMacOS
		    declare function isFullKeyboardAccessEnabled lib CocoaLib selector "isFullKeyboardAccessEnabled" (obj_id as Ptr) as Boolean
		    
		    return isFullKeyboardAccessEnabled(self)
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function IsHidden() As Boolean
		  
		  #if TargetMacOS
		    declare function isHidden lib CocoaLib selector "isHidden" (obj_id as Ptr) as Boolean
		    
		    return isHidden(self)
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function IsRunning() As Boolean
		  
		  #if TargetMacOS
		    declare function isRunning lib CocoaLib selector "isRunning" (obj_id as Ptr) as Boolean
		    
		    return isRunning(self)
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function KeyWindow() As NSWindow
		  
		  #if TargetMacOS
		    declare function keyWindow lib CocoaLib selector "keyWindow" (obj_id as Ptr) as Ptr
		    
		    dim windowRef as Ptr = keyWindow(self)
		    if windowRef <> nil then
		      return new NSWindow(windowRef)
		    end if
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function MainWindow() As NSWindow
		  
		  #if TargetMacOS
		    declare function mainWindow lib CocoaLib selector "mainWindow" (obj_id as Ptr) as Ptr
		    
		    dim windowRef as Ptr = mainWindow(self)
		    if windowRef <> nil then
		      return new NSWindow(windowRef)
		    end if
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub MiniaturizeAll()
		  
		  #if TargetMacOS
		    declare sub miniaturizeAll lib CocoaLib selector "miniaturizeAll:" (obj_id as Ptr, sender as Ptr)
		    
		    miniaturizeAll self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSEventTrackingRunLoopMode() As String
		  
		  return Cocoa.StringConstant("NSEventTrackingRunLoopMode")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function NSModalPanelRunLoopMode() As String
		  
		  return Cocoa.StringConstant("NSModalPanelRunLoopMode")
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function OrderedDocuments() As NSDocument()
		  
		  #if TargetMacOS
		    declare function orderedDocuments lib CocoaLib selector "orderedDocuments" (obj_id as Ptr) as Ptr
		    
		    dim retArray() as NSDocument
		    
		    dim arrayRef as Ptr = orderedDocuments(self)
		    if arrayRef <> nil then
		      dim ns_array as new NSArray(arrayRef)
		      const sizeOfPtr = 4
		      dim arrayRange as Cocoa.NSRange = Cocoa.NSMakeRange(0, ns_array.Count)
		      dim m as MemoryBlock = ns_array.ValuesArray(arrayRange)
		      dim n as UInt32 = arrayRange.length-1
		      for i as integer = 0 to n
		        retArray.append new NSDocument(Ptr(m.UInt32Value(i*sizeOfPtr)))
		      next
		    end if
		    
		    return retArray
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function OrderedWindows() As NSWindow()
		  
		  #if TargetMacOS
		    declare function orderedWindows lib CocoaLib selector "orderedWindows" (obj_id as Ptr) as Ptr
		    
		    dim retArray() as NSWindow
		    
		    dim arrayRef as Ptr = orderedWindows(self)
		    if arrayRef <> nil then
		      dim ns_array as new NSArray(arrayRef)
		      const sizeOfPtr = 4
		      dim arrayRange as Cocoa.NSRange = Cocoa.NSMakeRange(0, ns_array.Count)
		      dim m as MemoryBlock = ns_array.ValuesArray(arrayRange)
		      dim n as UInt32 = arrayRange.length-1
		      for i as integer = 0 to n
		        retArray.append new NSWindow(Ptr(m.UInt32Value(i*sizeOfPtr)))
		      next
		    end if
		    
		    return retArray
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub OrderFrontCharacterPalette()
		  
		  #if TargetMacOS
		    declare sub orderFrontCharacterPalette lib CocoaLib selector "orderFrontCharacterPalette:" (obj_id as Ptr, sender as Ptr)
		    
		    orderFrontCharacterPalette self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub OrderFrontColorPanel()
		  
		  #if TargetMacOS
		    declare sub orderFrontColorPanel lib CocoaLib selector "orderFrontColorPanel:" (obj_id as Ptr, sender as Ptr)
		    
		    orderFrontColorPanel self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub OrderFrontStandardAboutPanel()
		  
		  #if TargetMacOS
		    declare sub orderFrontStandardAboutPanel lib CocoaLib selector "orderFrontStandardAboutPanel:" (obj_id as Ptr, sender as Ptr)
		    
		    orderFrontStandardAboutPanel self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub OrderFrontStandardAboutPanel(optionsDictionary as NSDictionary)
		  
		  #if TargetMacOS
		    declare sub orderFrontStandardAboutPanelWithOptions lib CocoaLib selector "orderFrontStandardAboutPanelWithOptions:" _
		    (obj_id as Ptr, optionsDictionary as Ptr)
		    
		    dim optionsDictionaryRef as Ptr
		    if optionsDictionary <> nil then
		      optionsDictionaryRef = optionsDictionary
		    end if
		    
		    orderFrontStandardAboutPanelWithOptions self, optionsDictionaryRef
		    
		  #else
		    #pragma unused optionsDictionary
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub PreventWindowOrdering()
		  
		  #if TargetMacOS
		    declare sub preventWindowOrdering lib CocoaLib selector "preventWindowOrdering" (obj_id as Ptr)
		    
		    preventWindowOrdering self
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub RegisterForRemoteNotification(types as UInt32)
		  
		  #if TargetMacOS
		    declare sub registerForRemoteNotificationTypes lib CocoaLib selector "registerForRemoteNotificationTypes:" (obj_id as Ptr, types as UInt32)
		    
		    registerForRemoteNotificationTypes self, types
		    
		  #else
		    #pragma unused types
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub RegisterServices(sendTypes() as String, returnTypes() as String)
		  
		  #if TargetMacOS
		    declare sub registerServicesMenuSendTypes lib CocoaLib selector "registerServicesMenuSendTypes:returnTypes:" _
		    (obj_id as Ptr, sendTypes as Ptr, returnTypes as Ptr)
		    
		    dim sendTypesArray as new NSArray(sendTypes)
		    dim returnTypesArray as new NSArray(returnTypes)
		    
		    registerServicesMenuSendTypes self, sendTypesArray, returnTypesArray
		    
		  #else
		    #pragma unused sendTypes
		    #pragma unused returnTypes
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub RemoveWindowsItem(aWindow as NSWindow)
		  
		  dim windowRef as Ptr
		  if aWindow <> nil then
		    windowRef = aWindow
		  end if
		  
		  self.RemoveWindowsItem windowRef
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub RemoveWindowsItem(aWindowRef as Ptr)
		  
		  #if TargetMacOS
		    declare sub removeWindowsItem lib CocoaLib selector "removeWindowsItem:" (obj_id as Ptr, aWindow as Ptr)
		    
		    removeWindowsItem self, aWindowRef
		    
		  #else
		    #pragma unused aWindowRef
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Function RequestUserAttention(requestType as NSRequestUserAttentionType) As Integer
		  
		  #if TargetMacOS
		    declare function requestUserAttention lib CocoaLib selector "requestUserAttention:" _
		    (obj_id as Ptr, requestType as NSRequestUserAttentionType) as Integer
		    
		    return requestUserAttention(self, requestType)
		    
		  #else
		    #pragma unused requestType
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub RunPageLayout()
		  
		  #if TargetMacOS
		    declare sub runPageLayout lib CocoaLib selector "runPageLayout:" (obj_id as Ptr, sender as Ptr)
		    
		    runPageLayout self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub SetWindowsNeedUpdate(flag as Boolean)
		  
		  #if TargetMacOS
		    declare sub setWindowsNeedUpdate lib CocoaLib selector "setWindowsNeedUpdate" (obj_id as Ptr, flag as Boolean)
		    
		    setWindowsNeedUpdate self, flag
		    
		  #else
		    #pragma unused flag
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub ShowHelp()
		  
		  #if TargetMacOS
		    declare sub showHelp lib CocoaLib selector "showHelp:" (obj_id as Ptr, sender as Ptr)
		    
		    showHelp self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub Unhide()
		  
		  #if TargetMacOS
		    declare sub unhide lib CocoaLib selector "unhide:" (obj_id as Ptr, sender as Ptr)
		    
		    unhide self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub UnhideAllApplications()
		  
		  #if TargetMacOS
		    declare sub unhideAllApplications lib CocoaLib selector "unhideAllApplications:" (obj_id as Ptr, sender as Ptr)
		    
		    unhideAllApplications self, self.id
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub UnhideWithoutActivation()
		  
		  #if TargetMacOS
		    declare sub unhideWithoutActivation lib CocoaLib selector "unhideWithoutActivation" (obj_id as Ptr)
		    
		    unhideWithoutActivation self
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub UnregisterForRemoteNotifications()
		  
		  #if TargetMacOS
		    declare sub unregisterForRemoteNotifications lib CocoaLib selector "unregisterForRemoteNotifications" (obj_id as Ptr)
		    
		    unregisterForRemoteNotifications self
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub UpdateWindows()
		  
		  #if TargetMacOS
		    declare sub updateWindows lib CocoaLib selector "updateWindows" (obj_id as Ptr)
		    
		    updateWindows self
		    
		  #endif
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Function UserInterfaceLayoutDirection() As NSUserInterfaceLayoutDirection
		  
		  #if TargetMacOS
		    declare function userInterfaceLayoutDirection lib CocoaLib selector "userInterfaceLayoutDirection" (obj_id as Ptr) as NSUserInterfaceLayoutDirection
		    
		    return userInterfaceLayoutDirection(self)
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function ValidRequestorForType(sendType as String, returnType as String) As Ptr
		  
		  #if TargetMacOS
		    declare function validRequestorForSendType lib CocoaLib selector "validRequestorForSendType:returnType:" _
		    (obj_id as Ptr, sendType as CFStringRef, returnType as CFStringRef) as Ptr
		    
		    return validRequestorForSendType(self, sendType, returnType)
		    
		  #else
		    #pragma unused sendType
		    #pragma unused returnType
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function Window(windowNum as Integer) As NSWindow
		  
		  #if TargetMacOS
		    declare function windowWithWindowNumber lib CocoaLib selector "windowWithWindowNumber:" (obj_id as Ptr, windowNum as Integer) as Ptr
		    
		    dim windowRef as Ptr = windowWithWindowNumber(self, windowNum)
		    if windowRef <> nil then
		      return new NSWindow(windowRef)
		    end if
		    
		  #else
		    #pragma unused windowNum
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function Windows() As NSWindow()
		  
		  #if TargetMacOS
		    declare function windows lib CocoaLib selector "windows" (obj_id as Ptr) as Ptr
		    
		    dim retArray() as NSWindow
		    
		    dim arrayRef as Ptr = windows(self)
		    if arrayRef <> nil then
		      dim ns_array as new NSArray(arrayRef)
		      const sizeOfPtr = 4
		      dim arrayRange as Cocoa.NSRange = Cocoa.NSMakeRange(0, ns_array.Count)
		      dim m as MemoryBlock = ns_array.ValuesArray(arrayRange)
		      dim n as UInt32 = arrayRange.length-1
		      for i as integer = 0 to n
		        retArray.append new NSWindow(Ptr(m.UInt32Value(i*sizeOfPtr)))
		      next
		    end if
		    
		    return retArray
		    
		  #endif
		  
		End Function
	#tag EndMethod


	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if TargetMacOS
			    declare function activationPolicy lib CocoaLib selector "activationPolicy" (obj_id as Ptr) as NSRunningApplication.NSApplicationActivationPolicy
			    
			    return activationPolicy(self)
			    
			  #endif
			  
			End Get
		#tag EndGetter
		#tag Setter
			Set
			  
			  #if TargetMacOS
			    declare sub setActivationPolicy lib CocoaLib selector "setActivationPolicy:" (obj_id as Ptr, policy as NSRunningApplication.NSApplicationActivationPolicy)
			    
			    setActivationPolicy self, value
			    
			  #else
			    #pragma unused value
			  #endif
			  
			End Set
		#tag EndSetter
		ActivationPolicy As NSRunningApplication.NSApplicationActivationPolicy
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if TargetMacOS
			    declare function dealegate lib CocoaLib selector "delegate" (obj_id as Ptr) as Ptr
			    
			    return dealegate(self)
			    
			  #endif
			  
			End Get
		#tag EndGetter
		#tag Setter
			Set
			  
			  #if TargetMacOS
			    declare sub setDealegate lib CocoaLib selector "setDelegate:" (obj_id as Ptr, dealegate as Ptr)
			    
			    setDealegate self, value
			    
			  #else
			    #pragma unused value
			  #endif
			  
			End Set
		#tag EndSetter
		Dealegate As Ptr
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if targetMacOS
			    declare function helpMenu lib CocoaLib selector "helpMenu" (obj_id as Ptr) as Ptr
			    
			    dim menuRef as Ptr = helpMenu(self)
			    if menuRef <> nil then
			      return new NSMenu(menuRef)
			    end if
			    
			  #endif
			  
			End Get
		#tag EndGetter
		#tag Setter
			Set
			  
			  #if targetMacOS
			    declare sub setHelpMenu lib CocoaLib selector "setHelpMenu:" (class_id as Ptr, aMenu as Ptr)
			    
			    dim menuRef as Ptr
			    if value <> nil then
			      menuRef = value
			    end if
			    
			    setHelpMenu(self, menuRef)
			    
			  #else
			    #pragma unused value
			  #endif
			  
			End Set
		#tag EndSetter
		HelpMenu As NSMenu
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if targetMacOS
			    declare function applicationIconImage lib CocoaLib selector "applicationIconImage" (obj_id as Ptr) as Ptr
			    
			    dim imageRef as Ptr = applicationIconImage(self)
			    if imageRef <> nil then
			      return new NSImage(imageRef)
			    end if
			    
			  #endif
			  
			End Get
		#tag EndGetter
		#tag Setter
			Set
			  
			  #if targetMacOS
			    declare sub setApplicationIconImage lib CocoaLib selector "setApplicationIconImage:" (class_id as Ptr, anImage as Ptr)
			    
			    dim imageRef as Ptr
			    if value <> nil then
			      imageRef = value
			    end if
			    
			    setApplicationIconImage(self, imageRef)
			    
			  #else
			    #pragma unused value
			  #endif
			  
			End Set
		#tag EndSetter
		IconImage As NSImage
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if targetMacOS
			    declare function mainMenu lib CocoaLib selector "mainMenu" (obj_id as Ptr) as Ptr
			    
			    dim menuRef as Ptr = mainMenu(self)
			    if menuRef <> nil then
			      return new NSMenu(menuRef)
			    end if
			    
			  #endif
			  
			End Get
		#tag EndGetter
		#tag Setter
			Set
			  
			  #if targetMacOS
			    declare sub setMainMenu lib CocoaLib selector "setMainMenu:" (class_id as Ptr, aMenu as Ptr)
			    
			    dim menuRef as Ptr
			    if value <> nil then
			      menuRef = value
			    end if
			    
			    setMainMenu(self, menuRef)
			    
			  #else
			    #pragma unused value
			  #endif
			  
			End Set
		#tag EndSetter
		MainMenu As NSMenu
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if TargetMacOS
			    declare function presentationOptions lib CocoaLib selector "presentationOptions" (obj_id as Ptr) as UInt32
			    
			    return presentationOptions(self)
			    
			  #endif
			  
			End Get
		#tag EndGetter
		#tag Setter
			Set
			  
			  #if TargetMacOS
			    declare sub setPresentationOptions lib CocoaLib selector "setPresentationOptions:" (obj_id as Ptr, newOptions as UInt32)
			    
			    setPresentationOptions self, value
			    
			  #else
			    #pragma unused value
			  #endif
			  
			End Set
		#tag EndSetter
		PresentationOptions As UInt32
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if targetMacOS
			    declare function servicesMenu lib CocoaLib selector "servicesMenu" (obj_id as Ptr) as Ptr
			    
			    dim menuRef as Ptr = servicesMenu(self)
			    if menuRef <> nil then
			      return new NSMenu(menuRef)
			    end if
			    
			  #endif
			  
			End Get
		#tag EndGetter
		#tag Setter
			Set
			  
			  #if targetMacOS
			    declare sub setServicesMenu lib CocoaLib selector "setServicesMenu:" (class_id as Ptr, aMenu as Ptr)
			    
			    dim menuRef as Ptr
			    if value <> nil then
			      menuRef = value
			    end if
			    
			    setServicesMenu(self, menuRef)
			    
			  #else
			    #pragma unused value
			  #endif
			  
			End Set
		#tag EndSetter
		ServicesMenu As NSMenu
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if TargetMacOS
			    declare function servicesProvider lib CocoaLib selector "servicesProvider" (obj_id as Ptr) as Ptr
			    
			    return servicesProvider(self)
			    
			  #endif
			  
			End Get
		#tag EndGetter
		#tag Setter
			Set
			  
			  #if TargetMacOS
			    declare sub setServicesProvider lib CocoaLib selector "setServicesProvider:" (obj_id as Ptr, aProvider as Ptr)
			    
			    setServicesProvider self, value
			    
			  #else
			    #pragma unused value
			  #endif
			  
			End Set
		#tag EndSetter
		ServicesProvider As Ptr
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if targetMacOS
			    declare function windowsMenu lib CocoaLib selector "windowsMenu" (obj_id as Ptr) as Ptr
			    
			    dim menuRef as Ptr = windowsMenu(self)
			    if menuRef <> nil then
			      return new NSMenu(menuRef)
			    end if
			    
			  #endif
			  
			End Get
		#tag EndGetter
		#tag Setter
			Set
			  
			  #if targetMacOS
			    declare sub setWindowsMenu lib CocoaLib selector "setWindowsMenu:" (class_id as Ptr, aMenu as Ptr)
			    
			    dim menuRef as Ptr
			    if value <> nil then
			      menuRef = value
			    end if
			    
			    setWindowsMenu(self, menuRef)
			    
			  #else
			    #pragma unused value
			  #endif
			  
			End Set
		#tag EndSetter
		WindowsMenu As NSMenu
	#tag EndComputedProperty


	#tag Constant, Name = NSApplicationPresentationAutoHideDock, Type = Double, Dynamic = False, Default = \"1", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationAutoHideMenuBar, Type = Double, Dynamic = False, Default = \"4", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationAutoHideToolbar, Type = Double, Dynamic = False, Default = \"2048", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationDefault, Type = Double, Dynamic = False, Default = \"0", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationDisableAppleMenu, Type = Double, Dynamic = False, Default = \"16", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationDisableForceQuit, Type = Double, Dynamic = False, Default = \"64", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationDisableHideApplication, Type = Double, Dynamic = False, Default = \"256", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationDisableMenuBarTransparency, Type = Double, Dynamic = False, Default = \"512", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationDisableProcessSwitching, Type = Double, Dynamic = False, Default = \"32", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationDisableSessionTermination, Type = Double, Dynamic = False, Default = \"128", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationFullScreen, Type = Double, Dynamic = False, Default = \"1024", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationHideDock, Type = Double, Dynamic = False, Default = \"2", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSApplicationPresentationHideMenuBar, Type = Double, Dynamic = False, Default = \"8", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSRemoteNotificationTypeBadge, Type = Double, Dynamic = False, Default = \"1", Scope = Public
	#tag EndConstant

	#tag Constant, Name = NSRemoteNotificationTypeNone, Type = Double, Dynamic = False, Default = \"0", Scope = Public
	#tag EndConstant


	#tag Enum, Name = NSRequestUserAttentionType, Type = UInt32, Flags = &h0
		NSCriticalRequest = 0
		NSInformationalRequest = 10
	#tag EndEnum

	#tag Enum, Name = NSUserInterfaceLayoutDirection, Type = Integer, Flags = &h0
		NSUserInterfaceLayoutDirectionLeftToRight
		NSUserInterfaceLayoutDirectionRightToLeft
	#tag EndEnum


	#tag ViewBehavior
		#tag ViewProperty
			Name="Index"
			Visible=true
			Group="ID"
			InitialValue="-2147483648"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Left"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Name"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Super"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Top"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
	#tag EndViewBehavior
End Class
#tag EndClass
